<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
<meta charset="UTF-8">
<title>办公无纸化系统</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/common/jquery-3.4.1.min.js}" ></script>
<script th:src="@{/js/bootstrap.min.js}" ></script>
</head>

<body>

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/index">首页</a>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
          人力资源 <span class="caret"></span>
          </a>
        
          <ul class="dropdown-menu">
            <li><a href="/account/list">用户列表</a></li>
          </ul>

        </li>
      </ul>

      <ul class="nav navbar-nav">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
          系统设置 <span class="caret"></span>
          </a>

          <ul class="dropdown-menu">
            <li><a href="/manager/accountList">账号管理</a></li>
            <li><a href="/manager/roleList">角色管理</a></li>
            <li><a href="/manager/permissionList">权限管理</a></li>
          </ul>

        </li>
      </ul>

      <form class="navbar-form navbar-left">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="请输入员工姓名或工号">
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
      </form>

      <!--未登录用户-->
      <ul th:if="${session.account} ==null" class="nav navbar-nav navbar-right">
        <li><a href="/account/register">注册</a></li>
        <li><a href="/account/login">登录</a></li>
      </ul>

      <!--已登录用户-->
      <ul th:if="${session.account} !=null" class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">

          <!-- 头像 -->
          <img style=" width: 22px; margin-right: 8px;" th:src="@{'E:/springboot-oa/avator/' + ${session.account.location}}" alt="..." class="img-rounded"/>
          欢迎你 : [[${session.account.nickName}]] <span class="caret"></span> </a>

          <ul class="dropdown-menu">
            <li><a href="/account/profile">个人信息</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="/account/logOut">退出登录</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>

<div class="jumbotron">
  <h1>欢迎使用无纸化办公系统</h1>
  <p>version 1.0 </p>
  <p></p>
</div>
</body>
</html>